<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Mall_room_type.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from '@/extension/mall/Mall_room_type.js'
import ViewGrid from '@/components/basic/ViewGrid.vue'
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: 'id',
        footer: 'Foots',
        cnName: '产品房型概括',
        name: 'Mall_room_type',
        url: '/roomTypes/',
        sortName: 'createDate',
      },
      extend: extend,
      editFormFields: {
        mall_Carousel: [],
        mall_code: '',
        mall_name: '',
        typeName: '',
        typeCode: '',
        mall_category: '',
        mall_Description: '',
        mall_Hotel: '',
        mall_image: [],
        mall_Label: '',
        mall_people: '',
        mall_volume: '',
        creator: '',
        modifier: '',
        modifyID: '',
        modifyDate: '',
        createID: '',
        createDate: '',
      },
      editFormOptions: [
        [
          { title: '房型名称', required: true, field: 'mall_name', type: 'text', colSize: 6 },
          { title: '房型编码', required: true, field: 'mall_code', type: 'text', colSize: 6 },
        ],
        [
          { title: '每日房量', required: true, field: 'mall_volume', type: 'number', colSize: 6 },
          { title: '标签', dataKey: 'Label', required: true, field: 'mall_Label', type: 'selectList', colSize: 6 },
        ],
        [
          { title: '轮播图', field: 'mall_Carousel', type: 'imgupgrade', multiple: true, maxFile: 3, colSize: 6 },
          { title: '封面图', field: 'mall_image', type: 'imgupgrade', multiple: true, maxFile: 3, colSize: 6 },
        ],
        [
          { title: '所属房类', required: true, field: 'mall_category', type: 'text', hidden: true, colSize: 6 },
          { title: '所属房类', field: 'typeName', type: 'text', hidden: true, colSize: 6 },
          { title: '所属酒店', dataKey: 'room_type', required: true, field: 'mall_Hotel', type: 'select', colSize: 6 },
        ],
        [{ title: '最多入住人数', field: 'mall_people', type: 'text', colSize: 6 }],
        [{ title: '房型描述', field: 'mall_Description', type: 'textarea', colSize: 12 }],
        [
          //  {"title":"房编码","field":"typeCode","type":"text"},
          // {"title":"房类型","field":"typeName","type":"text"},
        ],
      ],
      searchFormFields: { mall_Hotel: '', mall_Label: '' },
      searchFormOptions: [
        [
          { title: '所属酒店', dataKey: 'room_type', required: true, field: 'mall_Hotel', type: 'select' },
          { title: '标签', dataKey: 'Label', required: true, field: 'mall_Label', type: 'selectList' },
        ],
      ],
      columns: [
        { field: 'id', title: '主键', type: 'int', width: 90, hidden: true, readonly: true, require: true, align: 'left' },
        { field: 'mall_name', title: '房型名称', type: 'string', width: 220, align: 'left' },
        // {field:'mall_Hotel',title:'房型名称',bind:{key:'room_type',data:[]},type:'string',width:220,align:'left'},
        { field: 'mall_Hotel', title: '所属酒店', bind: { key: 'room_type', data: [] }, type: 'string', width: 220, align: 'left' },
        { field: 'mall_category', title: '所属房类', bind: { key: 'pro_type', data: [] }, type: 'string', width: 220, align: 'left' },
        // {field:'typeCode',title:'房类型编码',type:'string',width:120,align:'left'},
        //{field:'typeName',title:'房类类型',type:'string',width:120,align:'left'},
        { field: 'mall_Carousel', title: '轮播图', type: 'imgupgrade', width: 220, align: 'left', sortable: true },
        { field: 'mall_image', title: '封面图', type: 'imgupgrade', width: 220, align: 'left' },
        { field: 'mall_Label', title: '标签', bind: { key: 'Label', data: [] }, type: 'string', width: 220, align: 'left' },
        { field: 'mall_people', title: '最多入住人数', type: 'string', width: 220, align: 'left' },
        { field: 'mall_volume', title: '每日房量', type: 'string', width: 220, align: 'left' },
        { field: 'mall_Description', title: '房型描述', type: 'string', width: 220, align: 'left' },
        { field: 'creator', title: '创建人', type: 'string', width: 120, align: 'left' },
        { field: 'modifier', title: '修改人', type: 'string', width: 120, align: 'left' },
        //  {field:'modifyID',title:'修改人ID',type:'int',width:120,hidden:true,align:'left'},
        { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 120, align: 'left', sortable: true },
        // {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
        { field: 'createDate', title: '创建时间', type: 'datetime', width: 120, align: 'left', sortable: true },
      ],
      detail: {
        cnName: '#detailCnName',
        columns: [],
        sortName: '',
        key: '',
      },
    }
  },
}
export default vueParam
</script>
